package com.avengers.core.bean.enums;

import com.avengers.core.bean.IForceOutType;

/**
 * @author yu.wang
 * @since 2019-12-12 15:06
 **/
public enum ForceOutType implements IForceOutType {
    ip(0),
    phone(1),
    email(2);
    private static final long serialVersionUID = 1L;
    private final Integer value;

    ForceOutType(Integer value) {
        this.value = value;
    }

    public static ForceOutType valueFrom(Integer value) {
        for (ForceOutType forceOutType : ForceOutType.values()) {
            if (forceOutType.value.equals(value)) {
                return forceOutType;
            }
        }
        return null;
    }

    @Override
    public int value() {
        return value;
    }
}
